﻿using System;

namespace Jerry.DroidBuilder.Common
{
    public static class StatusReport
    {
        private static Action<string> _action;

        public static void SetReportAction(Action<string> action)
        {
            _action = action;
        }

        public static void Update(string message)
        {
            if (null != _action)
            {
                _action(message);
            }
        }

        public static void Update(string message, params object[] args)
        {
            if (null != _action)
            {
                _action(string.Format(message, args));
            }
        }
    }
}
